//
//  MyVideoViewController.m
//  didipai
//
//  Created by wangjia_01 on 16/3/8.
//  Copyright © 2016年 wangjia_01. All rights reserved.
//

#import "MyVideoViewController.h"
#import "MyVideoCollectionViewCell.h"


@interface MyVideoViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (weak, nonatomic) IBOutlet UIButton *back;
@property (weak, nonatomic) IBOutlet UICollectionView *video_collection;

@end

@implementation MyVideoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.video_collection.delegate = self;
    self.video_collection.dataSource = self;
    [self.video_collection registerNib:[UINib nibWithNibName:@"MyVideoCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"MyVideoCollectionViewCell"];
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)back:(UIButton *)sender {
    
}

-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 4;
}

-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
    return CGSizeMake((__MainScreen_Width-20)/2,(__MainScreen_Width-100)/2 );
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
    
    return UIEdgeInsetsMake(5, 5, 5, 5);
    
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    MyVideoCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MyVideoCollectionViewCell" forIndexPath:indexPath];
    return cell;
}
@end
